<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterMybankKfMybankWalletRecordAddTranType extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mybank_wallet_record', function (Blueprint $table) {
            $table->unsignedInteger('walletRecordType')->default(0)
                  ->comment('钱包交易类型 默认0 1 分账收入（美团）2 分账收入（收银）3 分账收入（饿了么）4 充值收入 5 订货支出 6 服务费支出 7 提现支出 8 订货退款 9 服务费退款')
                  ->after('transType');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mybank_wallet_record', function (Blueprint $table) {
            $table->dropColumn('walletRecordType');
        });
    }
}
